from selenium.webdriver.common.by import By

byid = By.ID
byname = By.NAME
bycname = By.CLASS_NAME
bytname = By.TAG_NAME
bylink = By.LINK_TEXT
bycss = By.CSS_SELECTOR
byxpath = By.XPATH
byparriallike = By.PARTIAL_LINK_TEXT

url = "http://10.59.9.8:7007/boss/"

# 登录界面元素配置信息
class LoginPageElements:
    """登录页面元素定位配置（优化后）"""
    # 账号
    login_username = byxpath, '//*[@id="form1"]/div[2]/ul[1]/li[2]/input'
    # 页面信息（会员登录）
    #密码
    login_pwd = byxpath,'//*[@id="form1"]/div[2]/ul[2]/li[2]/input'
    # login_dy_text = bycname, 'reg-new'
    # login_username = byname, 'username'
    # login_pwd = byname, 'password'
    login_btn = byxpath, '/html/body/div[1]/div[2]/div[1]/form/div[3]/input'
    login_dy_text = byxpath,'/html/body/div[1]/div[2]/div[2]/div[1]/h2'  #断言  系统菜单


login_pe = LoginPageElements()




# 首页界面元素配置信息
class settElements:
    """首页页面元素定位配置（优化后）"""
    # 点击结算管理
    sett_ele = byxpath, '/html/body/div[1]/div[2]/div[2]/div[2]/div[11]/h2'
    # 点击结算
    sett_ele_loc = byxpath, '/html/body/div[1]/div[2]/div[2]/div[2]/div[12]/ul/li/div/a'
    # 输入搜索内容
    search_input = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[2]/div[1]/form/div/table/tbody/tr/td[1]/input'
    # 点击搜索
    search_btn = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[2]/div[1]/form/div/table/tbody/tr/td[2]/div/div/button'
    #发起结算按钮
    recnoo_fqjsbtn = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[3]/div[2]/div[1]/ul/li[1]/a/span'

    sett_btn =byxpath,'//*[@id="navTab"]/div[2]/div[4]/div[2]/div[1]/ul/li[1]/a/span'
    #用户编号
    sett_user = byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[3]/div/form/div[1]/div/fieldset/dl[1]/dd/input'
    #用户名
    sett_username = byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[3]/div/form/div[1]/div/fieldset/dl[2]/dd/input'
    #点击获取可结算余额
    getsett_loc = byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[3]/div/form/div[1]/div/fieldset/dl[3]/dd/a'
    #可结算余额
    setamount_loc = byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[3]/div/form/div[1]/div/fieldset/dl[4]/dd/input'
    #提交按钮
    submit_loc = byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[3]/div/form/div[2]/ul/li[1]/div/div/button'
    #发起结算成功
    sucess_loc = byxpath,'//*[@id="alertMsgBox"]/div[1]/div/div[1]/div'


    #当前页面
    currentpage_loc = byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[2]/div[2]/div[3]/div[2]/ul/li[9]/input[1]'
    #断言用户名
    username_dy = byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[2]/div[2]/div[2]/div[2]/div/table/tbody/tr[1]/td[2]/div'
    #断言暂无数据
    nodata_dy = byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[2]/div[2]/div[2]/div[2]/div/table/tbody/tr/td/div'


sett_pe = settElements()


